import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const router = new VueRouter({
	routes: [
		{
			path: '/',
			redirect: '/dashboard',
			component: () => import('@/Layout'),
			children: [
				{
					path: 'dashboard',
					component: () => import('@/views/Home'),
				},
				{
					path: '/acl/user',
					component: () => import('@/views/UserAdmin'),
				},
				{
					path: '/acl/role',
					component: () => import('@/views/RoleAdmin'),
				},
				{
					path: '/acl/menu',
					component: () => import('@/views/MenuAdmin'),
				},
				{
					path: '/product/brand',
					component: () => import('@/views/ProductBrand'),
				},
				{
					path: '/product/attr',
					component: () => import('@/views/ProductAttr'),
				},
				{
					path: '/product/sku',
					component: () => import('@/views/ProductSku'),
				},
				{
					path: '/product/spu',
					component: () => import('@/views/ProductSpu'),
				},
			],
		},
		{
			path: '/login',
			component: () => import('@/views/Login'),
		},
	],
});

export default router;
